package at.fhj.ase;

//package au.edu.uq.csse2002.movie;



import org.contract4j5.contract.Contract;
import org.contract4j5.contract.Invar;
import org.contract4j5.contract.Post;

@Contract
public class Counter {
	@Invar(value="count>=0 && count <5", 
			message="Count must be between 0 and 5")
	private int count = 0;
	
	public Counter(){}

	@Post("$return >= 0")
	public int currentCount(){
		return count;
	}
	

	public void incrementCount(){
		count++;
	}
	
	public void reset(){
		count =0;
	}
	
	

}
